#include <stdio.h>
int main()
{void tongji(int *a);
int a[4]={0,0,0,0};
 printf("give the str:");
 
 tongji(a);
 printf("the number of letters:%d",a[0]);//字母
 printf("\n");
 printf("the number of spaces:%d",a[1]);//空格
 printf("\n");
 printf("the number of numbers:%d",a[2]);//数字
 printf("\n");
 printf("the number of others:%d",a[3]);//其他的
 return 0;
}
void tongji(int *a)
{char c;
 while((c=getchar())!='\n')
 {
 if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
         a[0]++;
 else if(c==' ')
         a[1]++;
 else if(c>='0'&&c<='9')
         a[2]++;
 else
         a[3]++;
 }
}